<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span></span>
        <ul>
            <li class="on"><a href="{:U('Users/personalInfo')}">个人资料</a></li>
            <li><a href="{:U('Users/personalLeval')}">等级头衔</a></li>
        </ul>
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Users/userCenter')}" class="iconfont back"></a>
    </header>

    <!--<form action="{:U('Users/personalInfo')}" method="post" enctype="multipart/form-data" id="form">-->
    <input type="hidden" name="uid" id="uid" value="{$arr.userid}">

    <div data-v-df275b96="" class="main personalInfo" s="[object Object]">
        <ul data-v-df275b96="">
            <li data-v-df275b96="" class="headImg sj_headImg_show">
                <div data-v-df275b96=""><span data-v-df275b96="">头像</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <img data-v-df275b96="" id="sj_HeadImg_img" src="{$arr.avatar}" alt="" width="50" height="50">
                        <input type="hidden" id="sj_HeadImg_input">
                        <a data-v-98161034="" class="fx_xg_photos_btn"></a>
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">昵称</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <input data-v-df275b96="" va-para="NickName" regmsg="请使用五位以内的汉字" tag="昵称" type="text" placeholder="请设置昵称" class="va39" name="NickName" id="nickname" value="{$arr.nickname}">
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">账号</span><em data-v-df275b96="">{$arr.accounts}</em></div>
            </li>
        </ul>
        <ul data-v-df275b96="">
            <li data-v-df275b96="">
                <div data-v-df275b96="">
                    <span data-v-df275b96="">手机</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <?php if(trim($arr['mobile'])==''){ ?>
                        <a href="{:U('Users/setMobile',array('id'=>$arr['userid']))}" class="" notsubmit="yes" data-v-df275b96="">绑定手机</a>
                        <?php }else{ ?>
                        <a href="{:U('Users/setMobile2',array('id'=>$arr['userid']))}" class="" notsubmit="yes" data-v-df275b96="">修改手机</a>
                        <?php } ?>
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">邮箱</span><i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <?php if(trim($arr['email'])==''){ ?>
                        <a href="{:U('Users/setMail',array('id'=>$arr['userid']))}" class="" notsubmit="yes" data-v-df275b96="">绑定邮箱</a>
                        <?php }else{ ?>
                        <a href="{:U('Users/setMail2',array('id'=>$arr['userid']))}" class="" notsubmit="yes" data-v-df275b96="">修改邮箱</a>
                        <?php } ?>
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">Q Q</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <input data-v-df275b96="" id="qqh" placeholder="QQ号为5-12位数字" va-para="QQ" tag="QQ号码" type="tel" maxlength="12" class="va39" name="QQ" value="<?php if(trim($arr['qq'])=='0'){echo '';}else{echo $arr['qq'];} ?>">
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">性别</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <select data-v-df275b96="" tag="性别" va-para="Sex" class="va39" name="Sex" id="sex">
                            <option data-v-df275b96="" value="3" <?php if($arr['sex']=='3')echo "selected"; ?>>保密</option>
                            <option data-v-df275b96="" value="1" <?php if($arr['sex']=='1')echo "selected"; ?>>男</option>
                            <option data-v-df275b96="" value="2" <?php if($arr['sex']=='2')echo "selected"; ?>>女</option>
                        </select>
                    </em>
                </div>
            </li>
            <li data-v-df275b96="">
                <div data-v-df275b96=""><span data-v-df275b96="">生日</span>
                    <i data-v-df275b96="" class="iconfont right"></i>
                    <em data-v-df275b96="">
                        <?php if(trim($arr['birth'])==''){ ?>
                           <input data-v-df275b96="" tag="生日" va-para="BirthDay" type="date" class="va39" name="BirthDay" id="birthday">
                        <?php }else{ ?>
                           <input data-v-df275b96="" tag="生日" value="{$arr.birth}" style="border: none;" disabled>
                        <?php }?>
                    </em>
                </div>
            </li>
        </ul>
        <div data-v-5f6cdb54="" class="_changeHeadImg" data-v-df275b96="" style="display: none;">
            <div data-v-5f6cdb54="" class="backShaw"></div>
            <div data-v-5f6cdb54="" class="changeContent">
                <h3 data-v-5f6cdb54="" class="line"><em data-v-5f6cdb54="">修改头像</em>
                    <a data-v-5f6cdb54="" class="sj_HeadImg_close"><i data-v-5f6cdb54="" class="iconfont"></i></a>
                </h3>

                <div data-v-5f6cdb54="" class="content">
                    <em data-v-5f6cdb54="">预览</em>
                    <img data-v-5f6cdb54="" id="changePhoto" src="{$arr.avatar}" alt="" title="11">
                    <input type="hidden" name="imgSrc" id="imgSrc">
                    <span data-v-5f6cdb54="" class="sj_HeadImg_name">小男孩</span>

                    <div data-v-5f6cdb54="" class="headImgListCon fix">
                        <span data-v-5f6cdb54="" class="nomore">
                           <i data-v-5f6cdb54="" class="iconfont"></i>
                        </span>

                        <div data-v-5f6cdb54="" class="headImgList">
                            <div data-v-5f6cdb54="" style="width:75rem" class="fixedHeadImgWidth fix">
                                <img data-v-5f6cdb54="" data-id="1" title="奥巴马" src="/style/images/pimg1.jpg">
                                <img data-v-5f6cdb54="" data-id="2" title="比尔盖茨" src="/style/images/pimg14.jpg">
                                <img data-v-5f6cdb54="" data-id="3" title="本拉登" src="/style/images/pimg9.jpg">
                                <img data-v-5f6cdb54="" data-id="4" title="普京" src="/style/images/pimg22.jpg">
                                <img data-v-5f6cdb54="" data-id="5" title="贝克汉姆" src="/style/images/pimg15.jpg">
                                <img data-v-5f6cdb54="" data-id="6" title="苍井空" src="/style/images/pimg25.jpg">
                                <img data-v-5f6cdb54="" data-id="7" title="泷泽萝拉" src="/style/images/pimg3.jpg">
                                <img data-v-5f6cdb54="" data-id="8" title="波多野结衣" src="/style/images/pimg23.jpg">
                                <img data-v-5f6cdb54="" data-id="9" title="希拉里" src="/style/images/pimg19.jpg">
                                <img data-v-5f6cdb54="" data-id="10" title="范冰冰" src="/style/images/pimg8.jpg">
                                <img data-v-5f6cdb54="" data-id="11" title="小男孩" src="/style/images/pimg17.jpg">
                                <img data-v-5f6cdb54="" data-id="12" title="小女孩" src="/style/images/pimg2.jpg">
                                <img data-v-5f6cdb54="" data-id="13" title="李敏镐" src="/style/images/pimg12.jpg">
                                <img data-v-5f6cdb54="" data-id="14" title="梅西" src="/style/images/pimg7.jpg">
                                <img data-v-5f6cdb54="" data-id="15" title="罗纳尔多" src="/style/images/pimg15.jpg">
                                <img data-v-5f6cdb54="" data-id="16" title="萨达姆" src="/style/images/pimg10.jpg">
                                <img data-v-5f6cdb54="" data-id="17" title="金正恩" src="/style/images/pimg5.jpg">
                                <img data-v-5f6cdb54="" data-id="18" title="科比" src="/style/images/pimg4.jpg">
                                <img data-v-5f6cdb54="" data-id="19" title="全智贤" src="/style/images/pimg20.jpg">
                                <img data-v-5f6cdb54="" data-id="20" title="林允儿" src="/style/images/pimg21.jpg">
                                <img data-v-5f6cdb54="" data-id="21" title="宋慧乔" src="/style/images/pimg11.jpg">
                                <img data-v-5f6cdb54="" data-id="22" title="朴信惠" src="/style/images/pimg18.jpg">
                                <img data-v-5f6cdb54="" data-id="23" title="宋承宪" src="/style/images/pimg16.jpg">
                                <img data-v-5f6cdb54="" data-id="24" title="宋仲基" src="/style/images/pimg13.jpg">
                                <img data-v-5f6cdb54="" data-id="25" title="杰森斯坦森" src="/style/images/pimg6.jpg">
                            </div>
                        </div>
                        <span data-v-5f6cdb54=""><i data-v-5f6cdb54="" class="iconfont"></i></span>
                    </div>
                    <div data-v-5f6cdb54="" class="changeBtn"><a data-v-5f6cdb54="" href="javascript:;" class="subBtn">保存头像</a>
                        <a data-v-5f6cdb54="" class="subBtn cancel sj_HeadImg_close">取消</a></div>
                </div>
            </div>
        </div>
    </div>

    <div id="layermbox20" class="layermbox layermbox0 layermshow" index="20" style="display: none;">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">头像保存成功</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <div id="nicheng" class="layermbox layermbox0 layermshow" index="21" style="display: none;">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">昵称保存成功</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <div id="qq" class="layermbox layermbox0 layermshow" index="21" style="display: none;">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">qq保存成功</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <div id="sex1" class="layermbox layermbox0 layermshow" index="21" style="display: none;">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">性别保存成功</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <div id="birth" class="layermbox layermbox0 layermshow" index="21" style="display: none;">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">生日保存成功</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--</form>-->
</div>
</body>
</html>
<script>
    $(".layermbtn").click(function(){
        $(this).parents(".layermbox").hide();
        window.location.href = "";
    })
    $(function () {
        $(".sj_headImg_show").click(function () {
            $("._changeHeadImg").show();
        })
        $(".sj_HeadImg_close").click(function () {
            $("._changeHeadImg").hide();
        })
        $(".fixedHeadImgWidth img").click(function () {
            var SRC = $(this).attr("src");
            var TIT = $(this).attr("title");
            $("#changePhoto").attr("src", SRC);
            $(".sj_HeadImg_name").text(TIT);
        })
        $(".subBtn").click(function () {
            var SRC = $("#changePhoto").attr("src");
            $("#sj_HeadImg_img").attr("src", SRC);
            $("#imgSrc").val(SRC);
            $("#sj_HeadImg_input").val(SRC);
            $("._changeHeadImg").hide();
            //更改头像
            var id = $("#uid").val();
            $.ajax({
                type: "POST",
                url: "{:U('Users/upd_image')}",
                data: {'id': id, 'images': SRC},
                success: function (dat) {
                    if (dat == 1) {
                        $("#layermbox20").show();
                    }
                }
            });
        })
        //更改昵称
        $("#nickname").blur(function () {
            var id = $("#uid").val();
            var name = $("#nickname").val();
            $.ajax({
                type: "POST",
                url: "{:U('Users/huanmingzi')}",
                data: {'id': id, 'name': name},
                success: function (dat) {
                    if (dat == 1) {
                        $("#nicheng").show();
                    }
                }
            });
        })
        //更改qq
        $("#qqh").blur(function () {
            var id = $("#uid").val();
            var qq = $("#qqh").val();
            $.ajax({
                type: "POST",
                url: "{:U('Users/qq')}",
                data: {'id': id, 'qq': qq},
                success: function (dat) {
                    if (dat == 1) {
                        $("#qq").show();
                    }
                }
            });
        })

        //更改性别
        $("#sex").blur(function () {
            var id = $("#uid").val();
            var sex = $("#sex").val();
            $.ajax({
                type: "POST",
                url: "{:U('Users/sex')}",
                data: {'id': id, 'sex': sex},
                success: function (dat) {
                    if (dat == 1) {
                        $("#sex1").show();
                    }
                }
            });
        })
        //更改生日
        $("#birthday").blur(function () {
            var id = $("#uid").val();
            var birthday = $("#birthday").val();
            $.ajax({
                type: "POST",
                url: "{:U('Users/birth')}",
                data: {'id': id, 'birthday': birthday},
                success: function (dat) {
                    if (dat == 1) {
                        $("#birth").show();
                    }
                }
            });
        })





    });

    $(".layermbtn").click(function(){
        $("#layermbox20").hide();
        $("#nicheng").hide();
        $("#qq").hide();
        $("#sex1").hide();
    })
</script>
